import { http } from '@/common/service.js' // 局部引入

// /student/#{1}
export function getStudentInfo(id){
	return http.get("/student/"+id)
}
//student修改个人信息
export function udStudentInfo(stuId,email,telephone,className,name,stuNumber,stationName,wechatNum,password,remark){
	return http.put("/student", {}, {
		params: {
			"stuId": stuId,
			"className":className,
			"name":name,
			"stuNumber":stuNumber,
			"telephone":telephone,
			"stationName" : stationName,
			"wechatNum":wechatNum,
			"password":password,
			"email": email,
			"remark":remark,
		},
		dataType: 'json'
	})	
}
//teacher 浏览个人信息
export function getTeacherInfo(id){
	return http.get("/teacher/"+id)
}
//teacher 修改个人信息
export function udTeacherInfo(tId,email,telephone,jobNum,name,wechatNum,password,remark){
	return http.put("/teacher",{},{
		params:{
			"tId":tId,
			"jobNum":jobNum,
			"name":name,
			"telephone":telephone,
			"wechatNum":wechatNum,
			"password":password,
			"email":email,
			"remark":remark,
		},
		dataType:'json'
	})
}
//enterprise 浏览个人信息
export function getEnterpriseInfo(id){
	return http.get("/enterprise/"+id)
}
//enterprise 修改个人信息
export function udEnterpriseInfo(eId,email,linkTel,name,website,introduction,linkPerson,password,remark){
	return http.put("/enterprise",{},{
		params:{
			"eId":eId,
			"name":name,
			"website":website,
			"introduction":introduction,
			"linkPerson":linkPerson,
			"linkTel":linkTel,
			"email":email,
			"password":password,
			"remark":remark,
		},
		dataType:'json'
	})
}

//改变状态为已读
export function changeStatus(nrid){
	return http.get("/msg/read/"+nrid)
}
//接收信息列表
export function getMsgsReceive(token,type){
	return http.get("/msgs/receive?token="+token+"&type="+type);
}

export function getDataPopularity(){
	return http.get("/data/popularity")
}

export function getDataPassing(){
	return http.get("/data/passing")
}